#pragma once

#include "Misc/EngineEditorMacros.h"
#include "Object/Object.h"
#include "EditorAbilityView.m.h"


class RWidget;
class REditorAbilityViewModel;
class REditorOperationView;



RCLASS()
class REditorAbilityView : public RObject
{
    ROBJECT

public:
    virtual void BindViewModel(TSharedObjectPtr<REditorAbilityViewModel> InViewModel) ;
    virtual void CreateWidget(TSharedObjectPtr<RWidget> InParent) 
    {
        //should be overrided by subclass
        assert(false);  
    
    }

    virtual void FillOperations(TSharedObjectPtr<RWidget> InTitleBar)
    {
        //should be overrided by subclass
        assert(false);
    
    }

    //fill title bar with name text
    //return width of text
    virtual std::function<float()> FillTextTitleBar(TSharedObjectPtr<RWidget> InTitleBar);
   
    TSharedObjectPtr<REditorAbilityViewModel>GetBaseViewModel();
protected:
    TWeakObjectPtr<REditorAbilityViewModel> BaseViewModel;

};